package com.crowntit.types.design.framework.link.model1;

public abstract class AbstractLogicLink<T, D, R> implements ILogicLink<T, D, R>{
    private ILogicLink<T, D, R>  next;

    @Override
    public ILogicLink next() {
        return next;
    }

    @Override
    public ILogicLink appendNext(ILogicLink next) {
        this.next = next;
        return next;
    }

    protected R next(T requestParam, D dynamicContext) throws Exception{
        return next.apply(requestParam, dynamicContext);
    }
}
